<?php /*a:1:{s:66:"D:\phpstudy_pro\WWW\sact\application\admin\view\index\console.html";i:1622602908;}*/ ?>
<!DOCTYPE html>
<html>
<head>
  <meta charset="utf-8">
  <title>welcome</title>
  <meta name="renderer" content="webkit">
  <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
  <meta name="viewport" content="width=device-width, initial-scale=1.0, minimum-scale=1.0, maximum-scale=1.0, user-scalable=0">
  <link rel="stylesheet" href="../../layuiadmin/layui/css/layui.css" media="all">
  <link rel="stylesheet" href="../../layuiadmin/style/admin.css" media="all">
</head>
<body>
<div class="layui-fluid">
  <div class="layui-row layui-col-space15">
    <div class="layui-col-md12">
      <div class="layui-card">
        <div class="layui-card-body ">
          <blockquote class="layui-elem-quote">欢迎管理员<b>:</b>
            <?php
              $time = date('Y-m-d H:i:s',time());
              $weekarray = array("日","一","二","三","四","五","六");
              $day = $weekarray[date("w")];
            ?>
            <span class="x-red"><b style="color: deeppink"><?php echo session('admin.username'); ?></b></span>
            <b><?php echo $time.'&nbsp;'.'星期'.$day ?></b>
            <b style="float: right"><?php echo htmlentities($_SERVER['SERVER_ADDR']); ?></b>
            <?php $server_hostname = gethostname(); $server_ip = gethostbyname($server_hostname); ?>
            <b style="float: right;margin-right: 20px"><?php echo $server_ip; ?></b>
          </blockquote>
        </div>
      </div>
    </div>


    <div class="layui-col-sm6 layui-col-md3">
      <div class="layui-card">
        <div class="layui-card-header">
          访问量
          <span class="layui-badge layui-bg-blue layuiadmin-badge">日</span>
        </div>
        <div class="layui-card-body layuiadmin-card-list">
          <p class="layuiadmin-big-font"><?php echo htmlentities($weekVisits); ?></p>
          <p>
            总计访问量
            <span class="layuiadmin-span-color"><?php echo htmlentities($sumWeekVisits); ?> <i class="layui-inline layui-icon layui-icon-flag"></i></span>
          </p>
        </div>
      </div>
    </div>

    <div class="layui-col-sm6 layui-col-md3">
      <div class="layui-card">
        <div class="layui-card-header">
          支出
          <span class="layui-badge layui-bg-cyan layuiadmin-badge">周</span>
        </div>
        <div class="layui-card-body layuiadmin-card-list">
          <p class="layuiadmin-big-font">￥<?php echo isset($weekExpenditure) ? htmlentities($weekExpenditure) : '0.00'; ?></p>
          <p>
            总支出
            <span class="layuiadmin-span-color">￥<?php echo isset($sumWeekExpenditure) ? htmlentities($sumWeekExpenditure) : '0.00'; ?> <i class="layui-inline layui-icon layui-icon-face-smile-b"></i></span>
          </p>
        </div>
      </div>
    </div>

    <div class="layui-col-sm6 layui-col-md3">
      <div class="layui-card">
        <div class="layui-card-header">
          支出
          <span class="layui-badge layui-bg-green layuiadmin-badge">月</span>
        </div>
        <div class="layui-card-body layuiadmin-card-list">

          <p class="layuiadmin-big-font">￥<?php echo isset($monthExpenditure) ? htmlentities($monthExpenditure) : '0.00'; ?></p>
          <p>
            总支出
            <span class="layuiadmin-span-color">￥<?php echo isset($sumMonthExpenditure) ? htmlentities($sumMonthExpenditure) : '0.00'; ?> <i class="layui-inline layui-icon layui-icon-dollar"></i></span>
          </p>
        </div>
      </div>
    </div>

    <div class="layui-col-sm6 layui-col-md3">
      <div class="layui-card">
        <div class="layui-card-header">
          支出
          <span class="layui-badge layui-bg-orange layuiadmin-badge">年</span>
        </div>
        <div class="layui-card-body layuiadmin-card-list">

          <p class="layuiadmin-big-font">￥<?php echo isset($yearExpenditure) ? htmlentities($yearExpenditure) : '0.00'; ?></p>
          <p>
            总支出
            <span class="layuiadmin-span-color">￥<?php echo isset($sumYearExpenditure) ? htmlentities($sumYearExpenditure) : '0.00'; ?> <i class="layui-inline layui-icon layui-icon-user"></i></span>
          </p>
        </div>
      </div>
    </div>

    <div class="layui-col-sm6" style="width: 100%">
      <div class="layui-card">
        <div class="layui-card-header">用户访问记录</div>
        <div class="layui-card-body">
          <table class="layui-table layuiadmin-page-table" lay-skin="line">
            <thead>
            <tr>
              <th>用户名</th>
              <th>登录IP</th>
              <th>服务器/主机名</th>
              <th>状态</th>
              <th>最后登录时间</th>
            </tr>
            </thead>
            <tbody>
              <?php foreach($res as $v): ?>
                <tr>
                  <td><span class="first"><?php echo htmlentities($v['nickname']); ?></span></td>
                  <td><span><?php echo htmlentities($v['server_ip']); ?></span></td>
                  <td><span><?php echo htmlentities($v['server_hostname']); ?></span></td>
                  <td><span>用户成功登录</span></td>
                  <td><i class="layui-icon layui-icon-log" style="font-size: small;"> <?php echo htmlentities($v['logintime']); ?></i></td>
                </tr>
              <?php endforeach; ?>
            </tbody>
          </table>
        </div>
      </div>
    </div>


</div>


</body>
</html>

